package com.android.camera2.common.ui;

import android.annotation.SuppressLint;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.ImageView;
import androidx.annotation.Nullable;

@SuppressLint("AppCompatCustomView")
public class CoverView extends ImageView {
    public CoverView(Context context) {
        super(context);
    }

    public CoverView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public CoverView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    public CoverView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
    }


    public void showCover() {
        setAlpha(0.5f);
        setVisibility(VISIBLE);
    }


    public void hideCover() {
        setAlpha(0.0f);
        setVisibility(INVISIBLE);
    }
}
